Salesforce Connector Queries
This section describes the SQL implementation used for the Salesforce Connector.
SQL Syntax
When writing queries against a Salesforce data connection, there are some things to keep in mind with regard to the format of your queries:
- Use explicit ANSI-style joins. The join should be specified in the FROM clause, not the WHERE clause.
- Avoid using parenthesis around joins where possible.
- String literals must be enclosed within single quotes.
- Any functions used in the SELECT clause must be aliased.
- Some common Salesforce tables use SQL reserved words in their table names (e.g. Case, Order, Group). These table names will need to be enclosed within double quotes and then aliased.
SQL Functions
The Salesforce Connector provides many functions similar to those available for most databases, including various string, data, and math functions.
String Functions
The Salesforce Connector STRING Functions perform string manipulations and return a string value. For example:
SELECT CONCAT(firstname, space(4), lastname) FROM Account WHERE Industry = 'Floppy Disks'
Date Functions
The Salesforce Connector DATE Functions perform date and date time manipulations. For example:
SELECT CURRENT_TIMESTAMP() FROM Account
Math Functions
The Salesforce Connector MATH functions provide various mathematical operations. For example:
SELECT RAND() FROM Account
Predicate Functions
The Salesforce Connector Predicate Functions can be used to specify criteria in the WHERE clause of your SQL queries. For example:
* FROM Account WHERE CreatedDate = NOW()
Function Parameters and Nesting SQL Functions
The Salesforce connector supports using column names, constants, and results of other functions as parameters to functions. The following are all valid uses of SQL functions:
SELECT CONCAT('Mr.', SPACE(2), firstname, SPACE(4), lastname) FROM Account
Known Limitations
- Salesforce limits query execution time to 60 seconds. If you have a long-running query, it may time out if it exceeds this limit.
- Queries that pull data from more than three tables may require the use of "TOP [n]" to limit the number of results returned.
- The Intersect and Minus join options in the Argos Visual Designer do not work with Salesforce connections.
- The option to group tables by type in the Argos Visual Designer does not work with Salesforce connections.